<script>
import Service from "@/views/aihuman/board/Service.vue";
import RecentProjects from "@/views/aihuman/board/RecentProjects.vue";
import CustomerService from "@/views/aihuman/board/CustomerService.vue";

export default {
  name: "Board",
  components: {CustomerService, RecentProjects, Service},
  data() {
    return {
      isShow: true
    }
  },
  methods: {
    customerPage() {
      this.isShow = false
    },
    saveOk() {
      this.$refs.projectRef.getList()
    }
  }
}
</script>

<template>
  <HuilanBasic>
    <template v-if="isShow">
      <service
        @on-customer="customerPage"
        @on-save="saveOk"
      />
      <recent-projects
        ref="projectRef"
      />
    </template>

    <customer-service
      v-else
      @ok="isShow = true"
    />
  </HuilanBasic>
</template>

<style scoped lang="scss">

</style>
